﻿<UserControl x:Name="userControl" x:Class="Coot.PhotoControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" Height="635" Width="770" HorizontalAlignment="Left" VerticalAlignment="Top">
	<UserControl.Resources>
		<Storyboard x:Key="open">
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
				<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1.3"/>
				<SplineDoubleKeyFrame KeySpline="0,0.81,0.37,0.95" KeyTime="00:00:00.5000000" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
				<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1.3"/>
				<SplineDoubleKeyFrame KeySpline="0,0.81,0.37,0.95" KeyTime="00:00:00.5000000" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.Opacity)">
				<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
				<SplineDoubleKeyFrame KeySpline="0,0.81,0.37,0.95" KeyTime="00:00:00.5000000" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
				<SplineDoubleKeyFrame KeyTime="00:00:00" Value="-50"/>
				<SplineDoubleKeyFrame KeySpline="0,0.81,0.37,0.95" KeyTime="00:00:00.5000000" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
				<SplineDoubleKeyFrame KeyTime="00:00:00" Value="50"/>
				<SplineDoubleKeyFrame KeySpline="0,0.81,0.37,0.95" KeyTime="00:00:00.5000000" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="close">
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.Opacity)">
				<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
				<SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0" KeySpline="0,0,1,1"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
	</UserControl.Resources>
	<UserControl.Triggers>
        <EventTrigger RoutedEvent="FrameworkElement.Loaded">
            <BeginStoryboard Storyboard="{StaticResource open}"/>
        </EventTrigger>
    </UserControl.Triggers>
    <Grid x:Name="grid" RenderTransformOrigin="0.5,0.5">
    	<Grid.RenderTransform>
    		<TransformGroup>
    			<ScaleTransform/>
    			<SkewTransform/>
    			<RotateTransform/>
    			<TranslateTransform/>
    		</TransformGroup>
    	</Grid.RenderTransform>
        <Rectangle HorizontalAlignment="Stretch" Margin="10" Name="rectangle1" Stroke="Black" VerticalAlignment="Stretch" Fill="White" />
        <Image Margin="25,25,25,70" Name="image" Stretch="Uniform" />
        <TextBlock HorizontalAlignment="Stretch" Margin="35,0,35,15" Name="caption" Text="Photo                                                                                                             Caption" VerticalAlignment="Bottom" Height="48" TextAlignment="Center" FontSize="16" FontWeight="Bold" FontStyle="Normal" FontFamily="Segoe Script" TextWrapping="Wrap" TextTrimming="None" />
    </Grid>
</UserControl>
